home *** CD-ROM | disk | FTP | other *** search
/ Internet.Works 40 / Issue 40.iso / pc / PCSoftware / HTML Tool 3.5 / htmltool.exe / _SETUP.1 / Quick keys.scp < prev    next >
Encoding:
Text File  |  2000-03-06  |  1.3 KB  |  52 lines

  1. <HTMLtool>Hotkeys on a web site !</HTMLtool>
  2.  
  3. <!-- TWO STEPS TO INSTALL QUICK KEYS:
  4.  
  5.   1.  Copy the coding into the HEAD of your HTML document
  6.   2.  Add the last code into the BODY of your HTML document  -->
  7.  
  8. <!-- STEP ONE: Paste this code into the HEAD of your HTML document  -->
  9.  
  10. <HEAD>
  11.  
  12. <SCRIPT LANGUAGE="JavaScript">
  13.  
  14. <!-- Begin
  15. var key = new Array();  // Define QuickKey pages here
  16. key['h'] = "index.html";
  17. key['f'] = "feedback.html";
  18. key['n'] = "new.html";
  19. key['s'] = "toc.html";
  20.  
  21. function getKey(keyStroke) {
  22. isNetscape=(document.layers);
  23. // Cross-browser key capture routine couresty
  24. // of Randy Bennett (rbennett@thezone.net)
  25. eventChooser = (isNetscape) ? keyStroke.which : event.keyCode;
  26. which = String.fromCharCode(eventChooser).toLowerCase();
  27. for (var i in key) if (which == i) window.location = key[i];
  28. }
  29. document.onkeypress = getKey;
  30. //  End -->
  31. </script>
  32. </HEAD>
  33.  
  34. <!-- STEP TWO: Copy this code into the BODY of your HTML document  -->
  35.  
  36. <BODY>
  37.  
  38. <center>
  39. <table border=0><tr><td>
  40. <pre>
  41. This site equipped with QuickKeys!
  42.  
  43. The following QuickKeys are available:
  44.  
  45. Press the letter 'h' for: Home Page
  46. Press the letter 'f' for: Feedback Page
  47. Press the letter 'n' for: What's New Page
  48. Press the letter 's' for: Site Contents
  49. </pre>
  50. </td></tr></table>
  51. </center>
  52.